package state;

/**
 * @author wcj
 * @Date 2021/6/30 22:24
 * @Version 1.0
 */
public class ForenoonState extends State {
    @Override
    public void writeProgram(Work work) {
        if (work.getHour() < 12) {
            System.out.println("上午工作，精力百倍!");
        } else {
            work.setCurrent(new AfternoonState());
            work.writeProgram();
        }
    }
}
